#include"w25q32.h"


void w25q32_init(void)
{
    spi_init();
}


void w25q32_id(uint8_t* mid,uint16_t * did)
{
    spi_start();

    spi_swapdata(0x9f);
    *mid=spi_swapdata(0xff);
    *did=0;
    *did|=spi_swapdata(0xff)<<8;
    *did|=spi_swapdata(0xff);

    spi_stop();
}
